#!/usr/bin/python3
# -*- coding:utf-8 -*-
""""
   @Author: 叶建伟
   @Email: yejw46507@hundsun.com
   @Time: 2022/6/15 10:07
   @File: 产品风险评估_删除.py
"""
import time
from 线下客户管理.线下客户共用脚本.open_menu import open_menu, arm_form_fill
from 基础公共脚本.步骤检查_hui2 import check_table, check_table_rows,FE
from 基础公共脚本.common_util import auto_fill_form

def product_level_delete(input_data=None, ui_expect=None):
    open_menu({'子系统名称': '反洗钱系统', '菜单名称': '产品风险评估/产品风险评估查询'})
    # 资源设置搜索框表单填入
    time.sleep(2)

    # FE.table().select_row("产品名称",input_data.get("产品名称"))
    FE.button(idname={'xpath':'//span[contains(text(),"'+input_data.get("产品名称")+'")]/ancestor::tr/td[1]/descendant::label[contains(@class,"h-checkbox-wrapper")]'}).click()
    FE.button("删除").click()
    FE.button(idname={'xpath':'//div[contains(@class,"h-modal-confirm")]/div/button/span[contains(text(),"确定")]'}).click()
    # 检查查询结果
    check_table_rows(input_data=None, ui_expect=ui_expect)